Add diagnostic::on_unimplemented attribute on rust >=1.78#437
Merged
wcampbell0x2a merged 1 commit intomasterfrom May 14, 2024
Merged
Add diagnostic::on_unimplemented attribute on rust >=1.78#437wcampbell0x2a merged 1 commit intomasterfrom
wcampbell0x2a merged 1 commit intomasterfrom
Conversation
* Add the following diagnostics to hopefully lead people in the right direction
when seeing trait problems related to ctxs and derives
error[E0277]: the trait bound `FieldF: deku::DekuReader<'_, _>` is not satisfied
--> examples/example.rs:37:14
|
37 | field_f: FieldF,
| ^^^^^^ the trait `deku::DekuReader<'_, _>` is not implemented for `FieldF`
|
= note: implement by adding #[derive(DekuRead)] to `FieldF`
= note: make sure the `ctx` sent into the function matches `FieldF`'s `ctx`
= help: the following other types implement trait `deku::DekuReader<'a, Ctx>`:
<() as deku::DekuReader<'_, Ctx>>
<(A, B) as deku::DekuReader<'a, Ctx>>
<(A, B, C) as deku::DekuReader<'a, Ctx>>
<(A, B, C, D) as deku::DekuReader<'a, Ctx>>
<(A, B, C, D, E) as deku::DekuReader<'a, Ctx>>
<(A, B, C, D, E, F) as deku::DekuReader<'a, Ctx>>
<(A, B, C, D, E, F, G) as deku::DekuReader<'a, Ctx>>
<(A, B, C, D, E, F, G, H) as deku::DekuReader<'a, Ctx>>
and 152 others
* Rust Release: https://blog.rust-lang.org/2024/05/02/Rust-1.78.0.html
* Rust MR: rust-lang/rust#119888
Contributor
Benchmark for 140a86bClick to view benchmark
|
sharksforarms
approved these changes
May 14, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#[diagnostic]namespace and#[diagnostic::on_unimplemented]attribute rust-lang/rust#119888